home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.unix
- From: megatek!barto@ucsd.edu (David Barto)
- Subject: v25i053: patch to ofiles -- v18i057
- Sender: sources-moderator@pa.dec.com
- Approved: vixie@pa.dec.com
-
- Submitted-By: megatek!barto@ucsd.edu (David Barto)
- Posting-Number: Volume 25, Issue 53
- Archive-Name: ofiles.pch
-
- [ this is a patch to "v18i057: REVISED ofiles, doesn't need Sun source". it
- is somehow poetic that i post this the same night i post a new "completely
- reworked" version of ofiles... --vix ]
-
- This is a patch to the 24 Mar 89 posting of ofiles, comp/sources/unix
- Volume 18, issue 57. This includes some minor editing changes, and
- will allow ofiles to now work correctly for sun4 and sun4c machines.
-
- -barto
-
- *** ofiles.c Thu Jun 13 11:57:23 1991
- --- ../ofiles.c Thu Jun 13 11:56:37 1991
- ***************
- *** 73,88 ****
- --- 73,92 ----
- #else
- # define KERNEL
- # include <sys/file.h>
- +
- # ifndef sun
- # include <sys/inode.h>
- # endif
- +
- # undef KERNEL
- #endif
-
- #include <machine/pte.h>
- +
- #if !defined(ultrix) && !defined(sun)
- # include <machine/machparam.h>
- #endif
- +
- #include <sys/proc.h>
- #include <nlist.h>
- #include <sys/stat.h>
- ***************
- *** 147,152 ****
- --- 151,157 ----
- ls_t lseek(), vtophys();
-
- void eread(), eseek();
- +
- #ifdef ultrix
- void exit(), nlist(), perror();
- #endif
- ***************
- *** 168,183 ****
- { "_proc" },
- #define X_NPROC 1
- {"_nproc"},
- ! #define X_USRPTMA 2
- ! {"_Usrptmap"},
- ! #define X_USRPT 3
- ! {"_usrpt"},
- ! #define X_SYSMAP 4
- {"_Sysmap"},
- ! #define SFIL 5
- { "_file" },
- ! #define SNFILE 6
- { "_nfile" },
- { "" },
- };
-
- --- 173,191 ----
- {"_proc"},
- #define X_NPROC 1
- {"_nproc"},
- ! #define X_SYSMAP 2
- {"_Sysmap"},
- ! #define SFIL 3
- {"_file"},
- ! #define SNFILE 4
- {"_nfile"},
- +
- + #ifndef sun
- + # define X_USRPTMA 5
- + {"_Usrptmap"},
- + # define X_USRPT 6
- + {"_usrpt"},
- + #endif
- {""},
- };
-
- ***************
- *** 216,228 ****
- --- 224,239 ----
- * and ULTRIX 2.2, using the lint libraries of the systems at the
- * Purdue University Computing Center.
- */
- +
- # if !defined(ultrix) && !defined(DYNIX) && !defined(sun)
- long lintlong;
- # endif
- +
- # ifdef ultrix
- struct nch *lintnch;
- float lintfloat;
- # endif
- +
- # if !defined(DYNIX)
- file = fileNFILE = NULL;
- fp = file;
- ***************
- *** 230,235 ****
- --- 241,247 ----
- nfile = 0;
- filen = nfile;
- # endif
- +
- # if !defined(ultrix) && !defined(DYNIX) && !defined(sun)
- inode = inodeNINODE = rootdir = NULL;
- i = inode;
- ***************
- *** 241,250 ****
- --- 253,264 ----
- nextinodeid = lintlong;
- filen = ninode;
- # endif
- +
- # ifdef sun
- tcp_ttl = 0;
- filen = tcp_ttl;
- # endif
- +
- # ifdef ultrix
- nch = NULL;
- lintnch = nch;
- ***************
- *** 272,294 ****
- "usage: %s [-d ] [-k nlist core] [-n] [-p] names\n",
- progname);
- #else
- ! (void) fprintf(stderr,
- ! "usage: %s [-d ] [-n] [-p] names\n", progname);
- #endif
- (void) fprintf(stderr, "\t-d = select verbose debugging output\n");
- #ifdef DYNIX
- (void) fprintf(stderr,
- "\t-k = use specified nlist and core files\n");
- #endif
- (void) fprintf(stderr,
- "\t-n = interpret names as network connection, hexadecimal,\n");
- (void) fprintf(stderr,
- "\t Protocol Control Block (PCB) addresses, as supplied\n");
- ! (void) fprintf(stderr,
- ! "\t by netstat's -A option\n");
- (void) fprintf(stderr, "\t-p = print only process IDs\n");
- ! (void) fprintf(stderr,
- ! "\tnames = file names or PCB addresses\n");
- exit(exitval);
- }
-
- --- 286,308 ----
- "usage: %s [-d ] [-k nlist core] [-n] [-p] names\n",
- progname);
- #else
- ! (void) fprintf(stderr, "usage: %s [-d ] [-n] [-p] names\n", progname);
- #endif
- +
- (void) fprintf(stderr, "\t-d = select verbose debugging output\n");
- +
- #ifdef DYNIX
- (void) fprintf(stderr,
- "\t-k = use specified nlist and core files\n");
- #endif
- +
- (void) fprintf(stderr,
- "\t-n = interpret names as network connection, hexadecimal,\n");
- (void) fprintf(stderr,
- "\t Protocol Control Block (PCB) addresses, as supplied\n");
- ! (void) fprintf(stderr, "\t by netstat's -A option\n");
- (void) fprintf(stderr, "\t-p = print only process IDs\n");
- ! (void) fprintf(stderr, "\tnames = file names or PCB addresses\n");
- exit(exitval);
- }
-
- ***************
- *** 303,309 ****
- case 'd':
- debug = 1;
- break;
- ! #ifdef DYNIX
- case 'k':
- if ((ax + 2) >= argc) {
- (void) fprintf(stderr,
- --- 317,324 ----
- case 'd':
- debug = 1;
- break;
- !
- ! #if defined(DYNIX) || defined(sun)
- case 'k':
- if ((ax + 2) >= argc) {
- (void) fprintf(stderr,
- ***************
- *** 310,316 ****
- "%s: no nlist/core after -k\n",
- progname);
- err++;
- ! } else {
- namelist = argv[++ax];
- corefile = argv[++ax];
- k_opt = 1;
- --- 325,332 ----
- "%s: no nlist/core after -k\n",
- progname);
- err++;
- ! }
- ! else {
- namelist = argv[++ax];
- corefile = argv[++ax];
- k_opt = 1;
- ***************
- *** 318,323 ****
- --- 334,340 ----
- }
- break;
- #endif
- +
- case 'n':
- n_opt++;
- break;
- ***************
- *** 327,334 ****
- break;
-
- default:
- ! (void) fprintf(stderr,
- ! "%s: unknown switch - %c\n",
- progname, *(ap - 1));
- err++;
- }
- --- 344,350 ----
- break;
-
- default:
- ! (void) fprintf(stderr, "%s: unknown switch - %c\n",
- progname, *(ap - 1));
- err++;
- }
- ***************
- *** 344,356 ****
- }
-
- #ifdef sun
- ! if ((kd = kvm_open (NULL, NULL, NULL, O_RDONLY)) == 0) {
- ! (void) fprintf(stderr, "%s: can't access memory: ",
- ! progname);
- perror ("");
- exit(1);
- }
- #endif
- if ((mem = open("/dev/mem", 0)) < 0) {
- (void) fprintf(stderr, "%s: /dev/mem: ", progname);
- perror("");
- --- 360,377 ----
- }
-
- #ifdef sun
- ! if (kopt)
- ! kd = kvm_open(namelist, corefile, NULL, O_RDONLY, progname);
- ! else
- ! kd = kvm_open(NULL, NULL, NULL, O_RDONLY, progname);
- !
- ! if (kd == 0) {
- ! (void) fprintf(stderr, "%s: can't access memory: ", progname);
- perror("");
- exit(1);
- }
- #endif
- +
- if ((mem = open("/dev/mem", 0)) < 0) {
- (void) fprintf(stderr, "%s: /dev/mem: ", progname);
- perror("");
- ***************
- *** 358,369 ****
- }
- if (k_opt) {
- if ((kmem = open(corefile, 0)) < 0) {
- ! (void) fprintf(stderr, "%s: %s: ",
- ! progname, corefile);
- perror("");
- exit(1);
- }
- ! } else {
- if ((kmem = open("/dev/kmem", 0)) < 0) {
- (void) fprintf(stderr, "%s: /dev/kmem: ", progname);
- perror("");
- --- 379,390 ----
- }
- if (k_opt) {
- if ((kmem = open(corefile, 0)) < 0) {
- ! (void) fprintf(stderr, "%s: %s: ", progname, corefile);
- perror("");
- exit(1);
- }
- ! }
- ! else {
- if ((kmem = open("/dev/kmem", 0)) < 0) {
- (void) fprintf(stderr, "%s: /dev/kmem: ", progname);
- perror("");
- ***************
- *** 387,393 ****
- continue;
- }
- fsname = "";
- ! } else {
- /* assume arg is a filesystem */
- if ((fs = getfsfile(argv[ax])) != NULL) {
- fsname = argv[ax];
- --- 408,415 ----
- continue;
- }
- fsname = "";
- ! }
- ! else {
- /* assume arg is a filesystem */
- if ((fs = getfsfile(argv[ax])) != NULL) {
- fsname = argv[ax];
- ***************
- *** 396,406 ****
- else
- filename = fs->fs_spec;
- /* maybe it's the device name for a filesystem */
- ! } else if ((fs = getfsspec(argv[ax])) != NULL) {
- filename = argv[ax];
- fsname = fs->fs_file;
- /* probably a regular file */
- ! } else {
- filename = argv[ax];
- fsname = "";
- }
- --- 418,430 ----
- else
- filename = fs->fs_spec;
- /* maybe it's the device name for a filesystem */
- ! }
- ! else if ((fs = getfsspec(argv[ax])) != NULL) {
- filename = argv[ax];
- fsname = fs->fs_file;
- /* probably a regular file */
- ! }
- ! else {
- filename = argv[ax];
- fsname = "";
- }
- ***************
- *** 434,439 ****
- --- 458,464 ----
- flags = 0;
- if (p.p_stat == 0 || p.p_stat == SZOMB)
- continue;
- +
- #ifdef sun
- u = kvm_getu(kd, &p);
- #else
- ***************
- *** 459,488 ****
- findf++;
- }
- }
- #ifdef DYNIX
- for (filen = 0; filen < u->u_nofile; filen++)
- #else
- for (filen = 0; filen < NOFILE; filen++)
- #endif
- {
- struct file f;
-
- flags = 0;
- if (n_opt) {
- #ifdef DYNIX
- if (u->u_lofile[filen].of_file != fp)
- #else
- if (u->u_ofile[filen] != fp)
- #endif
- continue;
- ! } else {
- #ifdef DYNIX
- if (u->u_lofile[filen].of_file == NULL)
- - continue;
- #else
- if (u->u_ofile[filen] == NULL)
- - continue;
- #endif
- }
-
- if (k_opt)
- --- 484,532 ----
- findf++;
- }
- }
- +
- #ifdef DYNIX
- for (filen = 0; filen < u->u_nofile; filen++)
- #else
- +
- + # ifdef sun
- + for (filen = 0; filen < NOFILE_IN_U; filen++)
- + # else
- for (filen = 0; filen < NOFILE; filen++)
- # endif
- + #endif
- +
- {
- struct file f;
-
- flags = 0;
- if (n_opt) {
- +
- #ifdef DYNIX
- if (u->u_lofile[filen].of_file != fp)
- #else
- +
- + # ifdef sun
- + if (u->u_ofile_arr[filen] != fp)
- + # else
- if (u->u_ofile[filen] != fp)
- # endif
- + #endif
- continue;
- ! }
- ! else {
- !
- #ifdef DYNIX
- if (u->u_lofile[filen].of_file == NULL)
- #else
- +
- + # ifdef sun
- + if (u->u_ofile_arr[filen] == NULL)
- + # else
- if (u->u_ofile[filen] == NULL)
- # endif
- + #endif
- + continue;
- }
-
- if (k_opt)
- ***************
- *** 491,502 ****
- --- 535,553 ----
- #else
- eseek(kmem, vtophys((ls_t) u->u_ofile[filen]), 0, "file");
- #endif
- +
- else
- #ifdef DYNIX
- eseek(kmem, (ls_t) u->u_lofile[filen].of_file, 0, "file");
- #else
- +
- + # ifdef sun
- + eseek(kmem, (ls_t) u->u_ofile_arr[filen], 0, "file");
- + # else
- eseek(kmem, (ls_t) u->u_ofile[filen], 0, "file");
- # endif
- + #endif
- +
- eread(kmem, (char *) &f, sizeof(f), "file");
-
- if (f.f_count > 0) {
- ***************
- *** 505,510 ****
- --- 556,562 ----
- findf++;
- continue;
- }
- +
- #if defined(DYNIX) || defined(sun)
- if (f.f_type != DTYPE_VNODE)
- #else
- ***************
- *** 511,520 ****
- --- 563,574 ----
- if (f.f_type != DTYPE_INODE)
- #endif
- continue;
- +
- #if defined(DYNIX) || defined(sun)
- i = getinode((struct vnode *) f.f_data,
- "ofile");
- #else
- +
- # ifdef ultrix
- i = getinode((struct gnode *) f.f_data,
- "ofile");
- ***************
- *** 523,529 ****
- --- 577,585 ----
- "ofile");
- # endif
- #endif
- +
- if (check(&s, i)) {
- +
- #if !defined(ultrix)
- opninode = i->i_number;
- #else
- ***************
- *** 594,600 ****
- (void) strcat(ty, "/s");
- else if (f & EXFILE)
- (void) strcat(ty, "/x");
- ! } else if (f & CDIR)
- ty = "cwd";
- else if (f & RDIR)
- ty = "rdir";
- --- 650,657 ----
- (void) strcat(ty, "/s");
- else if (f & EXFILE)
- (void) strcat(ty, "/x");
- ! }
- ! else if (f & CDIR)
- ty = "cwd";
- else if (f & RDIR)
- ty = "rdir";
- ***************
- *** 621,626 ****
- --- 678,684 ----
- */
- check(s, i)
- struct stat *s;
- +
- #ifdef ultrix
- struct gnode *i;
- #else
- ***************
- *** 629,634 ****
- --- 687,693 ----
- {
- if (s == (struct stat *) NULL)
- return 0;
- +
- #ifdef ultrix
- if (i == (struct gnode *) NULL)
- return 0;
- ***************
- *** 637,643 ****
- else if ((s->st_dev == i->g_dev) && (s->st_ino == i->g_req.gr_number))
- return 1;
- #else
- ! if (i == (struct inode *)NULL) return 0;
- if ((s->st_mode & S_IFMT) == S_IFBLK && s->st_rdev == i->i_dev)
- return 1;
- else if ((s->st_dev == i->i_dev) && (s->st_ino == i->i_number))
- --- 696,703 ----
- else if ((s->st_dev == i->g_dev) && (s->st_ino == i->g_req.gr_number))
- return 1;
- #else
- ! if (i == (struct inode *) NULL)
- ! return 0;
- if ((s->st_mode & S_IFMT) == S_IFBLK && s->st_rdev == i->i_dev)
- return 1;
- else if ((s->st_dev == i->i_dev) && (s->st_ino == i->i_number))
- ***************
- *** 647,653 ****
- else if (s->st_rdev == i->i_dev && i->i_number == 0)
- return 1;
- #endif
- ! else return 0;
- }
-
-
- --- 707,714 ----
- else if (s->st_rdev == i->i_dev && i->i_number == 0)
- return 1;
- #endif
- ! else
- ! return 0;
- }
-
-
- ***************
- *** 655,660 ****
- --- 716,722 ----
- * getinode - read an inode from from mem at address "addr"
- * return pointer to inode struct.
- */
- +
- #if defined(DYNIX) || defined(sun)
- struct inode *
- getinode(ip, s)
- ***************
- *** 663,672 ****
- {
- static struct inode i;
- static struct vnode v;
- #ifdef sun
- struct snode sn;
- #endif
- -
- if (ip == NULL)
- return(NULL);
- if (k_opt)
- --- 725,734 ----
- {
- static struct inode i;
- static struct vnode v;
- +
- # ifdef sun
- struct snode sn;
- # endif
- if (ip == NULL)
- return (NULL);
- if (k_opt)
- ***************
- *** 681,697 ****
- eseek(kmem, vtophys((ls_t)v.v_data), 0, "inode");
- else
- eseek(kmem, (ls_t)v.v_data, 0, "inode");
- #ifdef sun
- if (v.v_type == VBLK || v.v_type == VCHR || v.v_type == VFIFO) {
- eread(kmem, (char *)&sn, sizeof(sn), "snode");
- if (debug)
- ! (void) printf(
- ! "snode %s at %x %x dev=%x realvp=%x bdevvp=%x\n",
- s, ip, sn.s_vnode.v_type, sn.s_dev,
- sn.s_realvp, sn.s_bdevvp);
- if (sn.s_realvp || sn.s_bdevvp) {
- ! eseek(kmem,
- ! (sn.s_realvp) ? (ls_t)sn.s_realvp
- : (ls_t)sn.s_bdevvp,
- 0, "rvnode");
- eread(kmem, (char *)&v, sizeof(v), "rvnode");
- --- 743,758 ----
- eseek(kmem, vtophys((ls_t) v.v_data), 0, "inode");
- else
- eseek(kmem, (ls_t) v.v_data, 0, "inode");
- +
- # ifdef sun
- if (v.v_type == VBLK || v.v_type == VCHR || v.v_type == VFIFO) {
- eread(kmem, (char *) &sn, sizeof(sn), "snode");
- if (debug)
- ! (void) printf("snode %s at %x %x dev=%x realvp=%x bdevvp=%x\n",
- s, ip, sn.s_vnode.v_type, sn.s_dev,
- sn.s_realvp, sn.s_bdevvp);
- if (sn.s_realvp || sn.s_bdevvp) {
- ! eseek(kmem, (sn.s_realvp) ? (ls_t) sn.s_realvp
- : (ls_t) sn.s_bdevvp,
- 0, "rvnode");
- eread(kmem, (char *) &v, sizeof(v), "rvnode");
- ***************
- *** 714,719 ****
- --- 775,781 ----
- struct gnode *
- getinode(ip, s)
- struct gnode *ip;
- +
- # else
-
- struct inode *
- ***************
- *** 720,734 ****
- getinode(ip, s)
- struct inode *ip;
- #endif
- -
- char *s;
- {
- #if defined(ultrix)
- static struct gnode i;
- #else
- static struct inode i;
- #endif
- -
- eseek(kmem, (ls_t)ip, 0, "inode");
- eread(kmem, (char *)&i, sizeof(i), "inode");
- return &i;
- --- 782,795 ----
- getinode(ip, s)
- struct inode *ip;
- # endif
- char *s;
- {
- +
- # if defined(ultrix)
- static struct gnode i;
- # else
- static struct inode i;
- # endif
- eseek(kmem, (ls_t) ip, 0, "inode");
- eread(kmem, (char *) &i, sizeof(i), "inode");
- return &i;
- ***************
- *** 740,745 ****
- --- 801,807 ----
- * get user page for proc "p" from core or swap
- * return pointer to user struct
- */
- +
- # ifdef DYNIX
- struct user *
- getuser(p)
- ***************
- *** 782,788 ****
- }
- if (debug)
- (void) printf("read swap\n");
- ! } else {
- if (k_opt)
- (void) lseek(kmem, vtophys((ls_t)p->p_uarea), L_SET);
- else
- --- 844,851 ----
- }
- if (debug)
- (void) printf("read swap\n");
- ! }
- ! else {
- if (k_opt)
- (void) lseek(kmem, vtophys((ls_t) p->p_uarea), L_SET);
- else
- ***************
- *** 816,822 ****
- }
- if (debug)
- (void) printf("read swap\n");
- ! } else { /* boo */
- ptep = &Usrptma[btokmx(p->p_p0br) + p->p_szpt - 1];
-
- /* get the page table for the user page */
- --- 879,886 ----
- }
- if (debug)
- (void) printf("read swap\n");
- ! }
- ! else { /* boo */
- ptep = &Usrptma[btokmx(p->p_p0br) + p->p_szpt - 1];
-
- /* get the page table for the user page */
- ***************
- *** 850,857 ****
- return &user;
- }
- #endif
-
- - #endif
- /*
- * read with error checking
- */
- --- 914,921 ----
- return &user;
- }
- # endif
- + #endif /* !sun */
-
- /*
- * read with error checking
- */
- ***************
- *** 863,868 ****
- --- 927,933 ----
- char *s;
- {
- char buf[100];
- +
- if (read(fd, p, size) != size) {
- if (!k_opt) {
- (void) fprintf(stderr, "%s: eread ", progname);
- ***************
- *** 915,920 ****
- --- 980,986 ----
- register i;
-
- if (k_opt) {
- +
- #ifdef ultrix
- (void) nlist(namelist, nl);
- #else /* not ultrix */
- ***************
- *** 925,946 ****
- exit(1);
- }
- #endif /* ultrix */
- ! } else {
- #ifdef ultrix
- (void) nlist("/vmunix", nl);
- #else /* not ultrix */
- #ifdef DYNIX
- if (nlist("/dynix", nl) == -1)
- #else /* not DYNIX */
- if (nlist("/vmunix", nl) == -1)
- #endif /* DYNIX */
- {
- ! (void) fprintf(stderr,
- ! "%s: can't get name list from %s\n",
- #ifdef DYNIX
- ! progname, "/dynix");
- #else /* not DYNIX */
- ! progname, "/vmunix");
- #endif /* DYNIX */
- exit(1);
- }
- --- 991,1016 ----
- exit(1);
- }
- #endif /* ultrix */
- ! }
- ! else {
- !
- #ifdef ultrix
- (void) nlist("/vmunix", nl);
- #else /* not ultrix */
- +
- # ifdef DYNIX
- if (nlist("/dynix", nl) == -1)
- # else /* not DYNIX */
- if (nlist("/vmunix", nl) == -1)
- # endif /* DYNIX */
- +
- {
- ! (void) fprintf(stderr, "%s: can't get name list from %s\n", progname
- !
- # ifdef DYNIX
- ! "/dynix");
- # else /* not DYNIX */
- ! "/vmunix");
- # endif /* DYNIX */
- exit(1);
- }
- ***************
- *** 959,968 ****
- --- 1029,1040 ----
- eseek(kmem, (ls_t) (nl[X_NPROC].n_value), 0, "nproc");
- eread(kmem, (char *) &nproc, sizeof(nproc), "nproc");
-
- + #ifndef sun
- # ifndef DYNIX
- Usrptma = (struct pte *) nl[X_USRPTMA].n_value;
- usrpt = (struct pte *) nl[X_USRPT].n_value; /* used by <vmmac.h> */
- # endif
- + #endif
- return;
- }
-
- ***************
- *** 973,982 ****
- int n;
- struct proc *p;
- {
- if (k_opt)
- ! eseek(kmem, vtophys((ls_t)(procbase + (long)(n * sizeof(struct proc)))), 0, "proc");
- else
- ! eseek(kmem, (ls_t)(procbase + (long)(n * sizeof(struct proc))), 0, "proc");
- eread(kmem, (char *)p, sizeof(struct proc), "proc");
- return;
- }
- --- 1045,1055 ----
- int n;
- struct proc *p;
- {
- + register ls_t p_off = (ls_t)(procbase + (long)(n * sizeof(struct proc)));
- if (k_opt)
- ! eseek(kmem, vtophys(p_off), 0, "proc");
- else
- ! eseek(kmem, p_off, 0, "proc");
- eread(kmem, (char *) p, sizeof(struct proc), "proc");
- return;
- }
- ***************
- *** 1001,1010 ****
- paddr = (int)((int *)paddr + (vaddr / NBPG));
- (void) lseek(kmem, (ls_t)paddr, 0);
- (void) read(kmem, (char *)&paddr, sizeof paddr);
- ! #ifndef i386
- ! # define PTBITS 0x1ff /* 512 byte pages */
- ! #else
- # define PTBITS 0xfff /* 4096 byte pages */
- #endif
-
- return ((ls_t)(paddr & ~PTBITS) | (vaddr & PTBITS));
- --- 1074,1089 ----
- paddr = (int) ((int *) paddr + (vaddr / NBPG));
- (void) lseek(kmem, (ls_t) paddr, 0);
- (void) read(kmem, (char *) &paddr, sizeof paddr);
- !
- ! #if defined(i386) || defined(sun4c)
- # define PTBITS 0xfff /* 4096 byte pages */
- + #endif
- + #if defined(sun) && !defined(sun4c)
- + # define PTBITS 0x1fff /* 8192 byte pages */
- + #endif
- +
- + #ifndef PTBITS
- + # define PTBITS 0x1ff /* 512 byte pages */
- #endif
-
- return ((ls_t) (paddr & ~PTBITS) | (vaddr & PTBITS));
-
-